home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
programming
/
other
/
flexcat
/
lib
/
amigaoberon.sd
next >
Wrap
Text File
|
1999-04-19
|
2KB
|
86 lines
##stringtype Oberon
##shortstrings
(****************************************************************
This file was created automatically by `%fv'
Do NOT edit by hand!
AmigaOberon source description © 1994 by Albert Weinert
Using with AmigaOberon Interfaces for AmigaOS Release 3.1
Application: %b
Language : %l
Version : %v
Description: %f0
****************************************************************)
MODULE %o3;
IMPORT
lo := Locale, e := Exec, u := Utility, y := SYSTEM;
CONST
builtinlanguage = %l;
version = %v;
%i* = %d;\n %iSTR = %s;\n
TYPE
AppString = STRUCT
id : LONGINT;
str : e.LSTRPTR;
END;
AppStringArray = ARRAY %n OF AppString;
CONST
AppStrings = AppStringArray (
%i, y.ADR(%iSTR)%(,)
);
VAR
catalog : lo.CatalogPtr;
PROCEDURE CloseCatalog*();
BEGIN
IF catalog # NIL THEN lo.CloseCatalog (catalog); catalog:=NIL END;
END CloseCatalog;
PROCEDURE OpenCatalog*(loc:lo.LocalePtr; language:ARRAY OF CHAR);
VAR Tag : u.Tags4;
BEGIN
CloseCatalog();
IF (catalog = NIL) & (lo.base # NIL) THEN
Tag:= u.Tags4(lo.builtInLanguage, y.ADR(builtinlanguage),
u.skip, u.done,
lo.version, version,
u.done, u.done);
IF language # "" THEN
Tag[1].tag:= lo.language; Tag[1].data := y.ADR( language );
END;
catalog := lo.OpenCatalogA (loc, "%b.catalog", Tag);
END;
END OpenCatalog;
PROCEDURE GetString* (num: LONGINT): e.LSTRPTR;
VAR
i: LONGINT;
default: e.LSTRPTR;
BEGIN
i := 0; WHILE (i < %n) AND (AppStrings[i].id # num) DO INC (i) END;
IF i # %n THEN
default := AppStrings[i].str;
ELSE
default := NIL;
END;
IF catalog # NIL THEN
RETURN lo.GetCatalogStr (catalog, num, default^);
ELSE
RETURN default;
END;
END GetString;
CLOSE
CloseCatalog();
END %o3.